Skip to main content

Requests & Response

Description and examples of request and responses

Request

curl 
--location 'https://eu.aimsmedical.ai/risk/api/do/v0' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_AUTHENTICATION_KEY' \
--data '[{
"id": 0,
"age": 24,
"sex": "F",
"inpatientAdmissions": 1,
"emergencyAdmissions": 2,
"stayDays": 40,
... additional fields
}]'

Response

Example of response for a consultation with a patient:

[{
"id": 0,
"risk": "Yes",
"error_message": null
}]

Example of response for a consultation with multiple patients:

[{
"id": 0,
"risk": null,
"error_message": [{
"Field": "mna_total",
"FieldDate": "11-07-2022",
"ExtendError": "ValueError for value Total in idx 0 (the sum of the values '7.00' does not coincide with the sum provided)"
},
{
"Field": "age",
"FieldDate": "",
"ExtendError": "ValueMissing for value age"
}]
},
{
"id": 1,
"risk": "No",
"error_message": [{
"Field": "barthel_chairTransfers",
"FieldDate": "25-08-2021",
"ExtendError": "ValueError for value ChairTransfers in idx 1 (out of range)"
}]
}]

Parameters are described in Parameters.